package com.mindata.blockchain.socket.body;

/**
 * User: jasperxgwang
 * Date: 2018-7-30 14:29
 */
public enum RpcCheckBlockResult {

    SUCCESS(0, "SUCCESS"),
    INVALID_NUMBER(-1, "区块number错误"),
    INVALID_AUTH(-2, "没有权限"),
    INVALID_HASH(-3, "hash错误"),
    INVALID_TIME(-4, "时间错误"),
    INVALID_SIGN(-5, "签名错误"),
    INVALID_NEXT_BLOCK(-10, "不合法的next block"),
    EXITS_INSTRUCTION(-11, "指令已存在");

    private int code;
    private String msg;

    RpcCheckBlockResult(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
